package com.qf.springbootssm.dao;

import com.qf.springbootssm.entity.User;
import com.qf.springbootssm.vo.SearchUserVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author manchi520
 * @date 2022/7/5
 * @apiNote
 */
@Mapper
public interface UserDao {
    public User findByUsernameAndPassword(@Param("name")String username, @Param("password")String password);

    public int register(User user);

    public User findByName(@Param("name")String name);

    public List<User> findAll();

    public int getCount();

    public int deleteById(int[] ids);

    public int addUser(User user);

    public int updateUser(User user);

    public List<User> search(SearchUserVo searchUserVo);

    public User findById(Integer id);

    public Integer batchInsertUser(List<User> reaminList);

}
